<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);

session_start();
		
	if(isset($_SESSION["userID"]))
	{
		session_destroy();
		
		if(isset($_COOKIE["ac"]))
		{
			setCookie("ac", "", time() - 2629743, "/");
		}
		
		header("Location:/rl.php?p=logout");
	}
	else if(isset($_COOKIE["ac"]))
	{
		setCookie("ac", "", time() - 2629743, "/");
		
		header("Location:/rl.php?p=logout");
	}
	else
	{
		header("Location:/");
	}
	
	

	
		
?>